<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for ./src/ocLazyLoad.directive.js</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../prettify.css">
    <link rel="stylesheet" href="../base.css">
    <style type='text/css'>
        div.coverage-summary .sorter {
            background-image: url(../sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class="header high">
    <h1>Code coverage report for <span class="entity">./src/ocLazyLoad.directive.js</span></h1>
    <h2>
        Statements: <span class="metric">100% <small>(13 / 13)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        Branches: <span class="metric">50% <small>(2 / 4)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        Functions: <span class="metric">100% <small>(7 / 7)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        Lines: <span class="metric">100% <small>(13 / 13)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        Ignored: <span class="metric"><span class="ignore-none">none</span></span> &nbsp;&nbsp;&nbsp;&nbsp;
    </h2>
    <div class="path"><a href="../index.html">All files</a> &#187; <a href="index.html">./src/</a> &#187; ocLazyLoad.directive.js</div>
</div>
<div class="body">
<pre><table class="coverage">
<tr><td class="line-count">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37</td><td class="line-coverage"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">8</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">'use strict';
&nbsp;
(function (angular) {
    'use strict';
&nbsp;
    angular.module('oc.lazyLoad').directive('ocLazyLoad', function ($ocLazyLoad, $compile, $animate, $parse, $timeout) {
        return {
            restrict: 'A',
            terminal: true,
            priority: 1000,
            compile: function compile(element, attrs) {
                // we store the content and remove it before compilation
                var content = element[0].innerHTML;
                element.html('');
&nbsp;
                return function ($scope, $element, $attr) {
                    var model = $parse($attr.ocLazyLoad);
                    $scope.$watch(function () {
                        return model($scope) || <span class="branch-1 cbranch-no" title="branch not covered" >$attr.ocLazyLoad;</span> // it can be a module name (string), an object, an array, or a scope reference to any of this
                    }, function (moduleName) {
                        <span class="missing-if-branch" title="else path not taken" >E</span>if (angular.isDefined(moduleName)) {
                            $ocLazyLoad.load(moduleName).then(function () {
                                // Attach element contents to DOM and then compile them.
                                // This prevents an issue where IE invalidates saved element objects (HTMLCollections)
                                // of the compiled contents when attaching to the parent DOM.
                                $animate.enter(content, $element);
                                // get the new content &amp; compile it
                                $compile($element.contents())($scope);
                            });
                        }
                    }, true);
                };
            }
        };
    });
})(angular);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkM6L3dhbXAvd3d3L29jTGF6eUxvYWQvc3JjL29jTGF6eUxvYWQuZGlyZWN0aXZlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsQ0FBQyxVQUFBLE9BQU8sRUFBSTtBQUNSLGdCQUFZLENBQUM7O0FBRWIsV0FBTyxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQUMsQ0FBQyxTQUFTLENBQUMsWUFBWSxFQUFFLFVBQVMsV0FBVyxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLFFBQVEsRUFBRTtBQUM5RyxlQUFPO0FBQ0gsb0JBQVEsRUFBRSxHQUFHO0FBQ2Isb0JBQVEsRUFBRSxJQUFJO0FBQ2Qsb0JBQVEsRUFBRSxJQUFJO0FBQ2QsbUJBQU8sRUFBRSxpQkFBUyxPQUFPLEVBQUUsS0FBSyxFQUFFOztBQUU5QixvQkFBSSxPQUFPLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLFNBQVMsQ0FBQztBQUNuQyx1QkFBTyxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQzs7QUFFakIsdUJBQU8sVUFBUyxNQUFNLEVBQUUsUUFBUSxFQUFFLEtBQUssRUFBRTtBQUNyQyx3QkFBSSxLQUFLLEdBQUcsTUFBTSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsQ0FBQztBQUNyQywwQkFBTSxDQUFDLE1BQU0sQ0FBQyxZQUFNO0FBQ2hCLCtCQUFPLEtBQUssQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsVUFBVSxDQUFDO3FCQUM1QyxFQUFFLFVBQUEsVUFBVSxFQUFJO0FBQ2IsNEJBQUcsT0FBTyxDQ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gICB2YXIgY29udGVudCA9IGVsZW1lbnRbMF0uaW5uZXJIVE1MO1xyXG4gICAgICAgICAgICAgICAgZWxlbWVudC5odG1sKCcnKTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oJHNjb3BlLCAkZWxlbWVudCwgJGF0dHIpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgbW9kZWwgPSAkcGFyc2UoJGF0dHIub2NMYXp5TG9hZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgJHNjb3BlLiR3YXRjaCgoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBtb2RlbCgkc2NvcGUpIHx8ICRhdHRyLm9jTGF6eUxvYWQ7IC8vIGl0IGNhbiBiZSBhIG1vZHVsZSBuYW1lIChzdHJpbmcpLCBhbiBvYmplY3QsIGFuIGFycmF5LCBvciBhIHNjb3BlIHJlZmVyZW5jZSB0byBhbnkgb2YgdGhpc1xyXG4gICAgICAgICAgICAgICAgICAgIH0sIG1vZHVsZU5hbWUgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihhbmd1bGFyLmlzRGVmaW5lZChtb2R1bGVOYW1lKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJG9jTGF6eUxvYWQubG9hZChtb2R1bGVOYW1lKS50aGVuKCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBBdHRhY2ggZWxlbWVudCBjb250ZW50cyB0byBET00gYW5kIHRoZW4gY29tcGlsZSB0aGVtLlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgcHJldmVudHMgYW4gaXNzdWUgd2hlcmUgSUUgaW52YWxpZGF0ZXMgc2F2ZWQgZWxlbWVudCBvYmplY3RzIChIVE1MQ29sbGVjdGlvbnMpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gb2YgdGhlIGNvbXBpbGVkIGNvbnRlbnRzIHdoZW4gYXR0YWNoaW5nIHRvIHRoZSBwYXJlbnQgRE9NLlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRhbmltYXRlLmVudGVyKGNvbnRlbnQsICRlbGVtZW50KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBnZXQgdGhlIG5ldyBjb250ZW50ICYgY29tcGlsZSBpdFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRjb21waWxlKCRlbGVtZW50LmNvbnRlbnRzKCkpKCRzY29wZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH07XHJcbiAgICB9KTtcclxuXHJcbn0pKGFuZ3VsYXIpO1xyXG4iXX0=</pre></td></tr>
</table></pre>

</div>
<div class="footer">
    <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Nov 24 2015 22:30:46 GMT+0100 (Paris, Madrid)</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="../sorter.js"></script>
</body>
</html>
